package com.iknow.maps;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.baidu.mapapi.OverlayItem;

public class BalloonOverlayView<Item extends OverlayItem> extends FrameLayout
{
  private LinearLayout layout;
  private View.OnClickListener mBtnClickListener;
  private TextView snippet;
  private TextView title;

  public BalloonOverlayView(Context paramContext, int paramInt, View.OnClickListener paramOnClickListener)
  {
    super(paramContext);
    setPadding(10, 0, 10, paramInt);
    this.layout = new LinearLayout(paramContext);
    this.layout.setVisibility(0);
    View localView = ((LayoutInflater)paramContext.getSystemService("layout_inflater")).inflate(2130903043, this.layout);
    this.title = ((TextView)localView.findViewById(2131296273));
    this.snippet = ((TextView)localView.findViewById(2131296274));
    ((ImageView)localView.findViewById(2131296275)).setOnClickListener(paramOnClickListener);
    FrameLayout.LayoutParams localLayoutParams = new FrameLayout.LayoutParams(-2, -2);
    localLayoutParams.gravity = 0;
    addView(this.layout, localLayoutParams);
  }

  public void setData(Item paramItem)
  {
    this.layout.setVisibility(0);
    if (paramItem.getTitle() != null)
    {
      this.title.setVisibility(0);
      this.title.setText(paramItem.getTitle());
      if (paramItem.getSnippet() == null)
        break label73;
      this.snippet.setVisibility(0);
      this.snippet.setText(paramItem.getSnippet());
    }
    while (true)
    {
      while (true)
      {
        return;
        this.title.setVisibility(8);
      }
      label73: this.snippet.setVisibility(8);
    }
  }
}